using MediatR;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using B.S.NewMedical.ErrorCode;

namespace B.S.NewMedical.Api.Write.Application.Command.ContentManagement.Hospital
{
    /// <summary>
    /// 新增医院命令
    /// </summary>
    public class AddHospitalCommand : IRequest<ApiResult<int>>
    {
        /// <summary>
        /// 医院名称
        /// </summary>
        [Required(ErrorMessage = "医院名称不能为空")]
        [StringLength(100, ErrorMessage = "医院名称长度不能超过100个字符")]
        public string HospitalName { get; set; } = string.Empty;

        /// <summary>
        /// 等级
        /// </summary>
        [StringLength(50, ErrorMessage = "医院等级长度不能超过50个字符")]
        public string? Level { get; set; }

        /// <summary>
        /// 医院类型Id
        /// </summary>
        public int? HospitalTypeId { get; set; }

        /// <summary>
        /// 联系方式
        /// </summary>
        [StringLength(100, ErrorMessage = "联系方式长度不能超过100个字符")]
        public string? ContactInfo { get; set; }

        /// <summary>
        /// 地区
        /// </summary>
        [StringLength(100, ErrorMessage = "地区长度不能超过100个字符")]
        public string? Region { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        [StringLength(500, ErrorMessage = "图片长度不能超过500个字符")]
        public string? Image { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        [StringLength(500, ErrorMessage = "详细地址长度不能超过500个字符")]
        public string? DetailedAddress { get; set; }

        /// <summary>
        /// 科室设置（科室ID列表）
        /// </summary>
        public List<int>? DepartmentIds { get; set; }

        /// <summary>
        /// 医生人数
        /// </summary>
        [Range(0, int.MaxValue, ErrorMessage = "医生人数不能为负数")]
        public int? NumberOfDoctors { get; set; }

        /// <summary>
        /// 科室数
        /// </summary>
        [Range(0, int.MaxValue, ErrorMessage = "科室数不能为负数")]
        public int? NumberOfDepartments { get; set; }

        /// <summary>
        /// 医院介绍
        /// </summary>
        [StringLength(2000, ErrorMessage = "医院介绍长度不能超过2000个字符")]
        public string? HospitalIntroduction { get; set; }

        /// <summary>
        /// 是否推荐
        /// </summary>
        public bool? IsRecommended { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        public string? CreatePeople { get; set; }
    }
}